package com.okhttpdemo.utils;

import java.math.BigDecimal;

/**
 * Created by 黄海 on 2017/2/17.
 */

public class StringUtils {

    public static String floatScale(double v, int newScale) {
        BigDecimal bigDecimal = new BigDecimal(v);
        return bigDecimal.setScale(2, BigDecimal.ROUND_CEILING).toPlainString();
    }
}